package com.grao.waterschool.human.entiry.po;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.time.LocalDateTime;
import javax.validation.constraints.Size;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "t_wschool_tuser")
public class TSysTuser implements Serializable {
    /**
     * 教职工号
     */
    @Schema(description = "ID")
    @TableId(value = "id", type = IdType.NONE)
    private Integer id;

    @Schema(description = "教职工号")
    @TableField(value = "teacher_num")
    private String teacherNum;

    /**
     * 用户名。用于登录
     */
    @Schema(description = "用户名。用于登录")
    @TableField(value = "tusername")
    @Size(max = 30,message = "用户名。用于登录最大长度要小于 10")
    private String tusername;

    /**
     * 教职工邮箱
     */
    @Schema(description = "教职工邮箱")
    @TableField(value = "temail")
    @Size(max = 100,message = "超长邮箱")
    private String temail;

    /**
     * 教职工姓名
     */
    @Schema(description = "教职工姓名")
    @TableField(value = "tnickname")
    @Size(max = 10,message = "请输入正确名称")
    private String tnickname;

    /**
     * 教职工电话
     */
    @Schema(description = "教职工电话")
    @TableField(value = "tphone")
    @Size(max = 15,message = "电话号码格式错误")
    private String tphone;

    /**
     * 密码
     */
    @Schema(description = "密码")
    @TableField(value = "tpassword")
    @Size(min = 8,message = "密码最低要大于8位")
    private String tpassword;

    /**
     * 最近一次登录时间
     */
    @Schema(description = "最近一次登录时间")
    @TableField(value = "last_login_time",fill = FieldFill.UPDATE)
    private LocalDateTime lastLoginTime;

    @Schema(description = "删除状态")
    @TableField(value = "delete_status")
    private String deleteStatus;

    private static final long serialVersionUID = 1L;
}
